﻿using System.Net.Mail;

namespace Common.Extentions
{
    /// <summary>
    /// Mail helper
    /// </summary>
   public static class MailHelper
    {
        /// <summary>
        /// Sends the specified mail address.
        /// </summary>
        /// <param name="mailAddress">The mail address.</param>
        /// <param name="body">The body.</param>
        public static void Send(string mailAddress,string body)
        {
            var msg = new MailMessage("trantuanvietniit@gmail.com", mailAddress, "Forgot Password", body)
                          {
                              From = new MailAddress("trantuanvietniit@gmail.com", "Tran Tuan Viet")
                          };
            var cl = new SmtpClient {EnableSsl = true};
            cl.Send(msg);
        }
    }
}
